package com.googlecode.kipler.syntax.concept;

public class Top extends Concept {

	@Override
	public boolean isNegated() {
		return false;
	}

	@Override
	public Concept toggleNegated() {
		return new Bottom();
	}

	@Override
	public void accept(ConceptVisitor v) {
		v.visitTop(this);
	}

	@Override
	public Concept copy() {
		Concept result = new Top();
		result.setLeftBiased(isLeftBiased());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (obj != null && (obj.getClass().equals(this.getClass()))) {
			Top other = (Top) obj;
			return (this.isLeftBiased() == other.isLeftBiased());
		}
		return false;
	}

	@Override
	public int hashCode() {
		return 17 * 37 + new Boolean(isLeftBiased()).hashCode()
				+ toString().hashCode();
	}

	@Override
	public String toString() {
		return "TOP";
	}

}
